# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

_realname=Role-Tiny
pkgname=perl-${_realname}
pkgver=2.000006
pkgrel=1
pkgdesc="Roles. Like a nouvelle cuisine portion size slice of Moose."
arch=('any')
url="https://search.cpan.org/dist/Role-Tiny/"
license=('PerlArtistic' 'GPL')
depends=('perl')
checkdepends=('perl-Test-Fatal>=0.003')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/H/HA/HAARG/Role-Tiny-${pkgver}.tar.gz)
sha512sums=('7640196c4bc1bf7a5437c57f0137f3bbf7c5fb92b9614805f16fec41dfb87a8bf6b7f3348ceade0800bccd72c4e5b72bcd4ab8bf28768ecda9d912c1b4c78047')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_realname}-${pkgver}
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL
  make
}

package() {
  cd ${_realname}-${pkgver}
  make install DESTDIR="${pkgdir}"
}
